package com.hwadee.property.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hwadee.property.dto.ChargeDetailPersonal;
import com.hwadee.property.pojo.ChargeDetail;
import com.hwadee.property.dto.PageResult;

import java.util.List;
import java.util.Map;

public interface IChargeDetailService extends IService<ChargeDetail> {
    PageResult<ChargeDetail> getPage(int current, int size, Long ownerId, Long communityId,
                                     Long houseId, Long chargeId, Long propertyStaffId, Integer feeMonth, int paymentStatus);

    /**
     * 根据业主ID查询缴费详情
     * @param ownerId 业主ID
     * @return 缴费详情列表
     */
    List<ChargeDetailPersonal> listByOwnerId(Long ownerId);

    /**
     * 更新缴费状态
     * @param id 缴费详情记录ID
     * @param paymentStatus 新的缴费状态
     * @return 是否更新成功
     */
    boolean updatePaymentStatus(Long id, int paymentStatus);

    /**
     * 统计小区内各缴费状态的数量
     *
     * @param communityId 小区ID
     * @return 缴费状态统计结果
     */
    Map<Integer, Integer> countPaymentStatusByCommunity(Long communityId);

    boolean addChargeDetail(ChargeDetail chargeDetail);

    List<ChargeDetail> addChargeDetailByProperty(Long userId, Integer month);

    List<String> listUnPayOwnerName(Long communityId);
}
